package com.goodving.guli.utility;

import android.os.Handler;

import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2015-11-17.
 */
public class C1479s {
    private static final boolean f6183a = false;
    private static final int f6184b = 3;
    private static ScheduledExecutorService f6185c;
    private static ScheduledExecutorService f6186d;
    private static Handler f6187e;

    static {
        f6185c = Executors.newScheduledThreadPool(f6184b);
        f6186d = Executors.newSingleThreadScheduledExecutor();
        f6187e = null;
    }

    public static Future<?> m12051a(Runnable runnable) {
        return f6185c.submit(runnable);
    }

    public static void m12055b(Runnable runnable) {
        if (f6187e == null) {
            f6187e = new Handler(C1481u.getContext().getMainLooper());
        }
        f6187e.post(runnable);
    }

    public static void m12054a(Runnable runnable, long j) {
        if (f6187e == null) {
            f6187e = new Handler(C1481u.getContext().getMainLooper());
        }
        f6187e.postDelayed(runnable, j);
    }

    public static void m12057c(Runnable runnable) {
        f6186d.submit(runnable);
    }

    public static void m12053a(Runnable runnable, int i) {
        f6186d.schedule(runnable, (long) i, TimeUnit.MILLISECONDS);
    }

    public static void m12056b(Runnable runnable, int i) {
        f6185c.schedule(runnable, (long) i, TimeUnit.MILLISECONDS);
    }

    public static void m12052a() {
        f6185c.shutdown();
        f6186d.shutdown();
    }
}

